<template>
  <view class="content">
    <button @click="request">打开</button>
    <spec-select
      ref="SpecSelectRef"
      :specList="goods.skuInfo.specList"
      :skuList="goods.skuInfo.skuList"
    />
  </view>
</template>

<script>
import { goods } from "./const";
import SpecSelect from "@/components/SpecSelect";
export default {
  components: { SpecSelect },
  data() {
    return {
      goods: null,
    };
  },
  onLoad() {},
  methods: {
    request() {
      this.goods = goods;
      this.$nextTick(() => {
        this.$refs.SpecSelectRef.open();
      });
      console.log("goods.specList", goods.skuInfo.specList);
      console.log("goods.skuList", goods.skuInfo.skuList);
    },
  },
};
</script>

<style>
.content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.logo {
  height: 200rpx;
  width: 200rpx;
  margin: 200rpx auto 50rpx auto;
}

.text-area {
  display: flex;
  justify-content: center;
}

.title {
  font-size: 36rpx;
  color: #8f8f94;
}
</style>
